package com.hl.card.modular.packBack.service.impl;


import com.hl.card.common.persistence.dao.JoinRebateTypeMapper;
import com.hl.card.common.persistence.model.JoinRebateType;
import com.hl.card.modular.packBack.service.JoinRebateTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class JoinRebateTypeServiceImpl implements JoinRebateTypeService{

    @Resource(name = "joinRebateTypeMapper")
    private JoinRebateTypeMapper joinRebateTypeMapper;
    @Override
    public List<Map<String, Object>> selectList() {
        return joinRebateTypeMapper.selectJoinType();
    }

    @Override
    public void save(JoinRebateType joinRebateType) {
        joinRebateTypeMapper.insert(joinRebateType);
    }

    @Override
    public void delete(int id) {
        joinRebateTypeMapper.deleteById(id);
    }

    @Override
    public void update(JoinRebateType joinRebateType) {
        joinRebateTypeMapper.updateById(joinRebateType);
    }

    @Override
    public JoinRebateType selectById(Integer id) {
        JoinRebateType joinRebateType = joinRebateTypeMapper.selectById(id);
        return joinRebateType;
    }

    @Override
    public JoinRebateType selectByCode(String code) {
        JoinRebateType joinRebateType = joinRebateTypeMapper.selectByCode(code);
        return joinRebateType;
    }
}
